#include <iostream>
#include <string>

using namespace std;

string src, dest;

int main() {
    cin >> src >> dest;
    int len = src.size();
    int prev = -1;
    int ans = 0;

    for (int i = 0; i < len; i++) {
        if (src[i] == dest[i]) continue;
        if (prev == -1)
            prev = i;
        else {
            ans += i - prev;
            prev = -1;
        }
    }
    cout << ans;
}